﻿{include file="public/header" /}
{css href="__ROOT__/static/public/umeditor/themes/default/css/umeditor.css" /}
{js href="__ROOT__/static/public/umeditor/third-party/template.min.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.config.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.min.js" /}
<form method="post" class="form-x" action="{if $data.id}?id={$data.id}{/if}">
	<input type="hidden" name="dada_shop_id" value="{$data.dada_shop_id}" />
    <div class="panel admin-panel">
        <div class="panel-head"><strong>{:lang('currency')['edit']}</strong></div>
        <br/>
        <script>
            //city canshu
            var pid = '{$data.pid}';
            var cid = '{$data.cid}';
            var aid = '{$data.aid}';
            var cate_id = '{$data.cate_id}';
            var selectc = true;
            var selecta = true;

            function select_a() {
                start();
            }
        </script>
        <div class="form-group">
            <div class="label">
                <label for="name">{:lang('currency')['city']}</label>
            </div>
            <div class="field">
                {include file="public/city" /}
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>{:lang('label')['category']}</label>
            </div>
            <div class="field">
                {include file="public/seller_category" /}
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>标签</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="label" name="label" value="{$data.label}" size="18"
                       placeholder="标签"/>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>坐标</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="lng" name="lng" value="{$data.lng}" size="20"
                       placeholder="经度" data-validate="required:{:lang('currency')['required']}"/>-
				<input type="text" class="input input-auto" id="lat" name="lat" value="{$data.lat}" size="20"
                       placeholder="纬度" data-validate="required:{:lang('currency')['required']}"/>
				<input type="hidden" id="range" name="range" value="{$data.range}" />
				<span class="addbtn"><button type="button" class="button coor">选择坐标</button></span>
				<span class="addbtn"><button type="button" class="button select_range">配送范围</button></span>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="idcard">详细地址</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="address" name="address" value="{$data.address}"
                       size="80" placeholder="详细地址" data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="name">店名</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="name" name="name" value="{$data.name}" size="80"
                       placeholder="店名" data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="name">真实姓名</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="truename" name="truename" value="{$data.truename}"
                       size="80" placeholder="真实姓名" data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="phone">{:lang('label')['phone']}</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="phone" name="phone" value="{$data.phone}" maxlength="11"
                       placeholder="{:lang('label')['phone']}"
                       data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="password">{:lang('label')['password']}</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="password" name="password" value="" size="80" placeholder="{:lang('label')['password']}" {if !$data.id}data-validate="required:{:lang('currency')['required']}" {/if} />
            </div>
        </div>
        <div class="form-group">
            <div class="input-inline clearfix">
                <div class="label">
                    <label for="headimg">店铺封面</label>
                </div>
                <div class="field">
                    <input type="text" readonly class="input input-auto" id="headimg" name="headimg"
                           value="{$data.headimg}" size="65" placeholder="店铺封面"/>
                    <span class="addbtn"><button type="button" data-id="headimg" class="button upload">{:lang('form')['file']}</button></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="input-inline clearfix">
                <div class="label">
                    <label for="headimg">店铺详情图片</label>
                </div>
                <div class="field">
                    <input type="text" readonly class="input input-auto" id="detail_image1" name="detail_image1" value="{$data.detail_image1}" size="65" placeholder="店铺详情图片"/>
                    <span class="addbtn"><button type="button" data-id="detail_image1" class="button upload">{:lang('form')['file']}</button></span>
                </div>
            </div>
        </div>
		{css href="__ROOT__/static/admin/css/daterangepicker.css" /}
		{js href="__ROOT__/static/public/js/moment.js" /}
		{js href="__ROOT__/static/public/js/daterangepicker.js" /}
		<style>
			.daterangepicker{
				display:none;
				border: 1px solid #08C;
			}
		</style>
		<div class="form-group">
			<div class="label">
				<label>营业时间</label>
			</div>
			<div class="field">
				<select class="input input-auto" name="start_time">
					<option {if $data['start_time']=='0000'}selected{/if} value="0000">00:00</option>
					<option {if $data['start_time']=='0030'}selected{/if} value="0030">00:30</option>
					<option {if $data['start_time']=='0100'}selected{/if} value="0100">01:00</option>
					<option {if $data['start_time']=='0130'}selected{/if} value="0130">01:30</option>
					<option {if $data['start_time']=='0200'}selected{/if} value="0200">02:00</option>
					<option {if $data['start_time']=='0230'}selected{/if} value="0230">02:30</option>
					<option {if $data['start_time']=='0300'}selected{/if} value="0300">03:00</option>
					<option {if $data['start_time']=='0330'}selected{/if} value="0330">03:30</option>
					<option {if $data['start_time']=='0400'}selected{/if} value="0400">04:00</option>
					<option {if $data['start_time']=='0430'}selected{/if} value="0430">04:30</option>
					<option {if $data['start_time']=='0500'}selected{/if} value="0500">05:00</option>
					<option {if $data['start_time']=='0530'}selected{/if} value="0530">05:30</option>
					<option {if $data['start_time']=='0600'}selected{/if} value="0600">06:00</option>
					<option {if $data['start_time']=='0630'}selected{/if} value="0630">06:30</option>
					<option {if $data['start_time']=='0700'}selected{/if} value="0700">07:00</option>
					<option {if $data['start_time']=='0730'}selected{/if} value="0730">07:30</option>
					<option {if $data['start_time']=='0800'}selected{/if} value="0800">08:00</option>
					<option {if $data['start_time']=='0830'}selected{/if} value="0830">08:30</option>
					<option {if $data['start_time']=='0900'}selected{/if} value="0900">09:00</option>
					<option {if $data['start_time']=='0930'}selected{/if} value="0930">09:30</option>
					<option {if $data['start_time']=='1000'}selected{/if} value="1000">10:00</option>
					<option {if $data['start_time']=='1030'}selected{/if} value="1030">10:30</option>
					<option {if $data['start_time']=='1100'}selected{/if} value="1100">11:00</option>
					<option {if $data['start_time']=='1130'}selected{/if} value="1130">11:30</option>
					<option {if $data['start_time']=='1200'}selected{/if} value="1200">12:00</option>
					<option {if $data['start_time']=='1230'}selected{/if} value="1230">12:30</option>
					<option {if $data['start_time']=='1300'}selected{/if} value="1300">13:00</option>
					<option {if $data['start_time']=='1330'}selected{/if} value="1330">13:30</option>
					<option {if $data['start_time']=='1400'}selected{/if} value="1400">14:00</option>
					<option {if $data['start_time']=='1430'}selected{/if} value="1430">14:30</option>
					<option {if $data['start_time']=='1500'}selected{/if} value="1500">15:00</option>
					<option {if $data['start_time']=='1530'}selected{/if} value="1530">15:30</option>
					<option {if $data['start_time']=='1600'}selected{/if} value="1600">16:00</option>
					<option {if $data['start_time']=='1630'}selected{/if} value="1630">16:30</option>
					<option {if $data['start_time']=='1700'}selected{/if} value="1700">17:00</option>
					<option {if $data['start_time']=='1730'}selected{/if} value="1730">17:30</option>
					<option {if $data['start_time']=='1800'}selected{/if} value="1800">18:00</option>
					<option {if $data['start_time']=='1830'}selected{/if} value="1830">18:30</option>
					<option {if $data['start_time']=='1900'}selected{/if} value="1900">19:00</option>
					<option {if $data['start_time']=='1930'}selected{/if} value="1930">19:30</option>
					<option {if $data['start_time']=='2000'}selected{/if} value="2000">20:00</option>
					<option {if $data['start_time']=='2030'}selected{/if} value="2030">20:30</option>
					<option {if $data['start_time']=='2100'}selected{/if} value="2100">21:00</option>
					<option {if $data['start_time']=='2130'}selected{/if} value="2130">21:30</option>
					<option {if $data['start_time']=='2200'}selected{/if} value="2200">22:00</option>
					<option {if $data['start_time']=='2230'}selected{/if} value="2230">22:30</option>
					<option {if $data['start_time']=='2300'}selected{/if} value="2300">23:00</option>
					<option {if $data['start_time']=='2330'}selected{/if} value="2330">23:30</option>
				</select>
				
				至
				
				<select class="input input-auto" name="end_time">
					<option {if $data['end_time']=='0030'}selected{/if} value="0030">00:30</option>
					<option {if $data['end_time']=='0100'}selected{/if} value="0100">01:00</option>
					<option {if $data['end_time']=='0130'}selected{/if} value="0130">01:30</option>
					<option {if $data['end_time']=='0200'}selected{/if} value="0200">02:00</option>
					<option {if $data['end_time']=='0230'}selected{/if} value="0230">02:30</option>
					<option {if $data['end_time']=='0300'}selected{/if} value="0300">03:00</option>
					<option {if $data['end_time']=='0330'}selected{/if} value="0330">03:30</option>
					<option {if $data['end_time']=='0400'}selected{/if} value="0400">04:00</option>
					<option {if $data['end_time']=='0430'}selected{/if} value="0430">04:30</option>
					<option {if $data['end_time']=='0500'}selected{/if} value="0500">05:00</option>
					<option {if $data['end_time']=='0530'}selected{/if} value="0530">05:30</option>
					<option {if $data['end_time']=='0600'}selected{/if} value="0600">06:00</option>
					<option {if $data['end_time']=='0630'}selected{/if} value="0630">06:30</option>
					<option {if $data['end_time']=='0700'}selected{/if} value="0700">07:00</option>
					<option {if $data['end_time']=='0730'}selected{/if} value="0730">07:30</option>
					<option {if $data['end_time']=='0800'}selected{/if} value="0800">08:00</option>
					<option {if $data['end_time']=='0830'}selected{/if} value="0830">08:30</option>
					<option {if $data['end_time']=='0900'}selected{/if} value="0900">09:00</option>
					<option {if $data['end_time']=='0930'}selected{/if} value="0930">09:30</option>
					<option {if $data['end_time']=='1000'}selected{/if} value="1000">10:00</option>
					<option {if $data['end_time']=='1030'}selected{/if} value="1030">10:30</option>
					<option {if $data['end_time']=='1100'}selected{/if} value="1100">11:00</option>
					<option {if $data['end_time']=='1130'}selected{/if} value="1130">11:30</option>
					<option {if $data['end_time']=='1200'}selected{/if} value="1200">12:00</option>
					<option {if $data['end_time']=='1230'}selected{/if} value="1230">12:30</option>
					<option {if $data['end_time']=='1300'}selected{/if} value="1300">13:00</option>
					<option {if $data['end_time']=='1330'}selected{/if} value="1330">13:30</option>
					<option {if $data['end_time']=='1400'}selected{/if} value="1400">14:00</option>
					<option {if $data['end_time']=='1430'}selected{/if} value="1430">14:30</option>
					<option {if $data['end_time']=='1500'}selected{/if} value="1500">15:00</option>
					<option {if $data['end_time']=='1530'}selected{/if} value="1530">15:30</option>
					<option {if $data['end_time']=='1600'}selected{/if} value="1600">16:00</option>
					<option {if $data['end_time']=='1630'}selected{/if} value="1630">16:30</option>
					<option {if $data['end_time']=='1700'}selected{/if} value="1700">17:00</option>
					<option {if $data['end_time']=='1730'}selected{/if} value="1730">17:30</option>
					<option {if $data['end_time']=='1800'}selected{/if} value="1800">18:00</option>
					<option {if $data['end_time']=='1830'}selected{/if} value="1830">18:30</option>
					<option {if $data['end_time']=='1900'}selected{/if} value="1900">19:00</option>
					<option {if $data['end_time']=='1930'}selected{/if} value="1930">19:30</option>
					<option {if $data['end_time']=='2000'}selected{/if} value="2000">20:00</option>
					<option {if $data['end_time']=='2030'}selected{/if} value="2030">20:30</option>
					<option {if $data['end_time']=='2100'}selected{/if} value="2100">21:00</option>
					<option {if $data['end_time']=='2130'}selected{/if} value="2130">21:30</option>
					<option {if $data['end_time']=='2200'}selected{/if} value="2200">22:00</option>
					<option {if $data['end_time']=='2230'}selected{/if} value="2230">22:30</option>
					<option {if $data['end_time']=='2300'}selected{/if} value="2300">23:00</option>
					<option {if $data['end_time']=='2330'}selected{/if} value="2330">23:30</option>
					<option {if $data['end_time']=='2400'}selected{/if} value="2400">24:00</option>
				</select>
			</div>
		</div>
        <!-- <div class="form-group">
            <div class="input-inline clearfix">
                <div class="label">
                    <label for="headimg">店铺详情图片2</label>
                </div>
                <div class="field">
                    <input type="text" readonly class="input input-auto" id="detail_image2" name="detail_image2" value="{$data.detail_image2}" size="65" placeholder="店铺详情图片2"/>
                    <span class="addbtn"><button type="button" data-id="detail_image2" class="button upload">{:lang('form')['file']}</button></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="input-inline clearfix">
                <div class="label">
                    <label for="headimg">店铺详情图片3</label>
                </div>
                <div class="field">
                    <input type="text" readonly class="input input-auto" id="detail_image3" name="detail_image3" value="{$data.detail_image3}" size="65" placeholder="店铺详情图片3"/>
                    <span class="addbtn"><button type="button" data-id="detail_image3" class="button upload">{:lang('form')['file']}</button></span>
                </div>
            </div>
        </div> -->
        <div class="form-group">
            <div class="label">
                <label>{:lang('label')['status']}</label>
            </div>
            <div class="field">
                <div class="button-group button-group-small radio">
                    <label class="button {if $data.status == "1" || !$data.status}active{/if}">
                    <input name="status" value="1" {if $data.status=="1" || !$data.status}checked="checked"{/if} type="radio"><span class="icon icon-check"></span>
                        {:lang('currency')['status_1']}
                    </label>
                    <label class="button {if $data.status == "2"}active{/if}">
                    <input name="status" value="2" {if $data.status== "2"}checked="checked"{/if} type="radio"><span class="icon icon-times"></span>
                        {:lang('currency')['status_2']}
                    </label>
                </div>
            </div>
        </div>
				<!-- <div class="form-group">
					<div class="label">
						<label>配送方式</label>
					</div>
					<div class="field">
						<div class="button-group button-group-small radio">
							<label class="button {if $data.express_type== 1 || !$data.express_type}active{/if}">
									<input name="express_type" value="1" {if $data.express_type== 1 || !$data.express_type}checked="checked"{/if} type="radio"><span class="icon icon-check"></span> 平台配送
							</label>
							<label class="button {if $data.type == 2}active{/if}">
							<input name="express_type" value="0" {if $data.express_type== 2}checked="checked"{/if} type="radio"><span class="icon icon-check"></span> 达达配送
							</label>
						</div>
					</div>
				</div> -->
        <div class="form-group">
            <div class="label">
                <label>抽佣模式</label>
            </div>
            <div class="field">
                <div class="button-group button-group-small radio">
                    <label class="button {if $data.comode == 1}active{/if}">
						<input name="comode" value="1" {if $data.comode== 1}checked="checked"{/if} type="radio"><span class="icon icon-check"></span>
						先抽佣
                    </label>
                    <label class="button {if !$data.comode}active{/if}">
                        <input name="comode" value="0" {if !$data.comode}checked="checked"{/if} type="radio"><span class="icon icon-check"></span>
                        后抽佣
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>是否支持预约</label>
            </div>
            <div class="field">
                <div class="button-group button-group-small radio">
                    <label class="button {if $data.advance == 1}active{/if}">
                    <input name="advance" value="1" {if $data.advance== 1}checked="checked"{/if} type="radio"><span class="icon icon-check"></span>
                    {:lang('currency')['status_1']}
                    </label>
                    <label class="button {if !$data.advance}active{/if}">
                        <input name="advance" value="0" {if !$data.advance}checked="checked"{/if} type="radio"><span class="icon icon-times"></span>
                        {:lang('currency')['status_2']}
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>是否推荐</label>
            </div>
            <div class="field">
                <div class="button-group button-group-small radio">
                    <label class="button {if $data.flag == 1}active{/if}"><input name="flag" value="1" {if $data.flag== 1}checked="checked" {/if} type="radio"><span
                            class="icon icon-check"></span> {:lang('currency')['status_1']}</label>
                    <label class="button {if $data.flag == 0 || !$data.flag}active{/if}"><input name="flag" value="0" {if $data.flag== 0 || !$data.flag}checked="checked" {/if} type="radio"><span class="icon icon-times"></span> {:lang('currency')['status_2']}</label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="name">新用户首单立减</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="new_user_reduction" name="new_user_reduction"
                       value="{$data.new_user_reduction}" size="10" placeholder="金额"
                       data-validate="required:{:lang('currency')['required']}"/> 元
            </div>
        </div>
		<div class="form-group">
            <div class="label">
                <label for="name">起送价</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="min_express_charge" name="min_express_charge"
                       value="{$data.min_express_charge}" size="10" placeholder="金额"
                       data-validate="required:{:lang('currency')['required']}"/> 元
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>抽成比例</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" style="width: 100px" max="100" min="1" name="cut"
                       value="{if !$data.cut}1{else}{$data.cut}{/if}"> %
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="idcard">{:lang('label')['idcard']}</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="idcard" name="idcard" value="{$data.idcard}" size="80"
                       placeholder="{:lang('label')['idcard']}"
                       data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-group">
            <div class="input-inline clearfix">
                <div class="label">
                    <label for="idcardimg">{:lang('label')['idcardimg']}</label>
                </div>
                <div class="field">
                    <input type="text" readonly class="input input-auto" id="idcardimg" name="idcardimg"
                           value="{$data.idcardimg}" size="65" placeholder="{:lang('label')['idcardimg']}"
                           data-validate="required:{:lang('currency')['required']}"/>
                    <span class="addbtn"><button type="button" data-id="idcardimg" class="button upload">{:lang('form')['file']}</button></span>
                    <br/>
                    <br/>
                    <p><img height=100px src="{$data.idcardimg}"/></p>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label for="idcard">提现帐号</label>
            </div>
            <div class="field">
                <input type="text" class="input input-auto" id="bank_card" name="bank_card" value="{$data.bank_card}"
                       size="80" placeholder="打款方式-卡号" data-validate="required:{:lang('currency')['required']}"/>
            </div>
        </div>
        <div class="form-button">
            <button class="button bg-main" type="submit">{:lang('form')['submit']}</button>
        </div>
        <br/>
    </div>
</form>
<script>
    $("[name='status']").click(function () {
        var status = $("[name='status']:checked").val();
        if (status == '4') {
            $("#refuse").removeClass('hidden');
        } else {
            $("#refuse").addClass('hidden');
        }
    });
	$(".coor").click(function(){
		layer.open({
			type:2,
			title:'选择坐标',
			area: ['60%', '80%'],
			offset: '5%',
			content: "{:url('/admin/seller/map')}"
		});
	});
	$(".select_range").click(function(){
		layer.open({
			type:2,
			title:'选择坐标',
			area: ['60%', '80%'],
			offset: '5%',
			content: "{:url('/admin/seller/map')}?type=range"
		});
	});
    var um = UM.getEditor('myEditor');
</script>
{include file="public/footer" /}